package com.ai.bitcoin.jpa.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@Table(name = "bcc_user_bonus_log")
@DynamicInsert
@DynamicUpdate
//@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class BccUserBonusLog extends Identity {
    private static final long serialVersionUID = 1L;
    //用户
    private String openId;
    //触发奖励方式
    private String eventTypeCd;
    //统计key
    private String totalKey;
    //唯一key
    private String uniqueKey;
    //触发日期
    private Date eventDate;
    //奖励PLC数值
    private BigDecimal bonusNumber;
    //当前用户PLC
    private BigDecimal totalPlc;
    @Transient
    private int times;

    @ManyToOne
    @JoinColumn(name = "config_id")
    private BccUserBonusConfig config;
}
